<?php
    require_once('layout/upper_pitcher.php');
?>
<script type="text/javascript">
    $(document).ready(function(){
        $('#loading').ajaxStart(function(){
            $(this).fadeIn();
            $('#komentar').fadeOut();
        }).ajaxStop(function(){
            $(this).fadeOut();
            $('#komentar').fadeIn();
        });
 
        $('#isi').submit(function(){
            $.ajax({
                type: $(this).attr('method'),
                url: $(this).attr('action'),
                data: $(this).serialize(),
                success: function(data){
                    $('#komentar').html(data);
                    $('#pesan').val('');
                    $('#pesan').focus();
                }
            })
            return false;
        });
        
        $('#komentar').load('<?=site_url()?>/welcome/shoutbox');
    })
 
    
        
</script>
<div class="container-panel">
  <h4><?php echo $judul; ?></h4>
  <div class="contentbox">
    <?php 
    $ret =  form_open('pegawai/index').
                "<fieldset >
                 <table class=\"formTabel\" border=\"0\" align=\"center\" cellpadding=\"5\" cellspacing=\"1\">
                  <tr>
                    <td class=\"kolom\" valign=\"top\">NIP/NAMA : <input type=\"text\" name=\"cari\" /></td>
                    <td valign=\"top\"><input class=\"tombol\" type=\"submit\" name=\"button\" id=\"button\" value=\"Cari\" /></td>
                    
                 </tr>
                 </table>
                 </fieldset>".
                 form_close();
    ?>
    
    <?php echo (isset($list_data)?$list_data:$ret); ?>

    <div class="container-panel">  
        
        <table border="0">
        <tr>
        <td>
        <fieldset>
            <form id="isi" method="post" action="<?=site_url()?>/welcome/shoutbox">
            <div style="color:#ff0; font-size:16; background-color:#6c92ff; width:190px;padding-left:10px"><b>Shoutbox</b>
                <span id="loading" style="color:#f00; display:none; font-weight:bold;">loading...</span>
            </div>
            <textarea cols="20" rows="5" name="pesan" id="pesan" style="width: 196px; height: 200px;" /></textarea><br />
            <input type="hidden" name="proses" value="submit" />
            <input type="hidden" name="nama" id="nama" value="<?php echo $username; ?>" /><br />
            <div style="padding-left:80px;"><input type="submit" value="Kirim" />
            </form>
        </fieldset ></td>
        <td>
            <div id="komentar" class="contentbox" style="width:700px;height:276px;overflow:auto"></div>
        </td>
        </tr>
        </table>
        </div>
    </div>
</div>
    <?php echo (isset($m)?$m:""); ?>
<?php
    require_once('layout/lower_pitcher.php');
?>
